Skip to main content

Ranks and Determinants

The Rank of a Matrix

The rank of an n×pn \times p matrix AA, denoted by rank(A)\text{rank}(A), is the largest number of columns of AA, which are not linearly dependent (i.e. the number of linearly independent columns).

Details

Vectors a1,a2,,ana_1, a_2, \ldots, a_n are said to be linearly dependent if there exist constants k1,,knk_1, \ldots, k_n that are not all zero, such that

k1a1+k2a2++knan=0k_1 a_1 + k_2 a_2 + \ldots + k_n a_n = 0

Note that if such constants exist, then we can write one of the aa 's as a linear combination of the rest, e.g. if k10k_1 \neq 0 then

a1=c1=k2k1a2k2k1ana_1=\mathbf{c_1} = -\displaystyle\frac{k_2}{k_1} a_2 - \ldots - \displaystyle\frac{k_2}{k_1} a_n

It can be shown that the rank of AA, is the same as the rank of AA'

i.e. the maximum number of linearly independent rows of AA.

Note

Note that if rank(A)=p\text{rank}(A) = p, then the columns are linearly independent.

Examples

Example

If

A=[1001]A = \left[ \begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array} \right]

then rank(A)\text{rank}(A) = 2, since

k1(10)+k2(01)=(00)k_1 \left( \begin{array}{cc} 1 \\ 0 \end{array} \right) + k_2 \left( \begin{array}{cc} 0 \\ 1 \end{array} \right) = \left( \begin{array}{cc} 0 \\ 0 \end{array} \right)

if and only if

(k1k2)=(00)\left( \begin{array}{cc} k_1 \\ k_2 \end{array} \right) = \left( \begin{array}{cc} 0 \\ 0 \end{array} \right)

so the columns are linearly independent.

Example

If

A=[101011000]A = \left[ \begin{array}{ccc} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{array} \right]

then rank(A)\text{rank}(A) = 2.

Example

If

A=[111010010]A = \left[ \begin{array}{ccc} 1 & 1 & 1 \\ 0 & 1 & 0 \\ 0 & 1 & 0 \end{array} \right]

then rank(A)\text{rank}(A) = 2. since

1(100)+0(011)+(1)(100)=01 \left( \begin{array}{ccc} 1 \\ 0 \\ 0 \end{array} \right) + 0 \left( \begin{array}{ccc} 0 \\ 1 \\ 1 \end{array} \right) + (-1) \left( \begin{array}{ccc} 1 \\ 0 \\ 0 \end{array} \right) = 0

(and hence the rank cannot be more than 2) but

k1(100)+k2(011)k_1 \left( \begin{array}{ccc} 1 \\ 0 \\ 0 \end{array} \right) + k_2 \left( \begin{array}{ccc} 0 \\ 1 \\ 1 \end{array} \right)

if and only if k1=k2=0k_1=k_2=0 (and hence the rank must be at least 2).

The Determinant

Recall that for a 2×22 \times 2 matrix,

A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}

the inverse of AA is

A1=1adbc[2331]A^{-1} = \displaystyle\frac{1}{ad-bc} \begin{bmatrix} 2 & 3 \\ 3 & 1 \end{bmatrix}

Details

Definition

The number adbcad-bc is called the determinant of the 2×22 \times 2 matrix AA.

Definition

Now suppose AA is an n×nn \times n matrix. An elementary product from the matrix is a product of nn terms based on taking exactly one term from each column of row xx. Each such term can be written in the form a1j1a2j2a3j3anjna_{1j_1} \cdot a_{2j_2} \cdot a_{3j_3} \cdot \ldots \cdot a_{nj_n} where j1,,jnj_1, \ldots, j_n is a permutation of the integers 1,2,,n1,2, \ldots, n. Each permutation σ\sigma of the integers 1,2,,n1,2,\ldots,n can be performed by repeatedly interchanging two numbers.

Definition

A signed elementary product is an elementary product with a positive sign if the number of interchanges in the permutation is even but negative otherwise.

The determinant of AA, det(A)\det(A) or A\vert A \vert, is the sum of all signed elementary products.

Examples

Example
A=[a11a12a21a22]A = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}

then

A=a11a22a12a21\vert A \vert = a_{1\underline{1}} a_{2\underline{2}} - a_{1\underline{2}}a_{2\underline{1}}.

Example

If

A=[a11a12a13a21a22a23a31a32a33]A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}

Then A\vert A \vert

= a11a22a33a_{11} a_{22} a_{33} This is the identity permutation and has positive sign

a11a23a32-a_{11} a_{23} a_{32} This is the permutation that only interchanges 22 and 33

a12a21a33-a_{12} a_{21} a_{33} Only one interchange

+a12a23a31+a_{12} a_{23} a_{31} Two interchanges

+a13a21a32+a_{13} a_{21} a_{32} Two interchanges

a13a22a31-a_{13} a_{22} a_{31} Three interchanges

Example
A=[1110]A = \begin{bmatrix} 1 & 1 \\ 1 & 0 \end{bmatrix}

A=1\vert A \vert = -1

Example
A=[100020003]A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix}

A=123=6\vert A \vert = 1 \cdot 2 \cdot 3 = 6

Example
A=[100020030]A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 3 & 0 \end{bmatrix}

A=0\vert A \vert = 0

Example
A=[100002030]A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 2 \\ 0 & 3 & 0 \end{bmatrix}

A=6\vert A \vert = -6

Example
A=[2121]A = \begin{bmatrix} 2 & 1 \\ 2 & 1 \end{bmatrix}

A=0\vert A \vert = 0

Example
A=[101011112]A = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 1 & 2 \end{bmatrix}

A=0\vert A \vert = 0

Ranks, Inverses and Determinants

The following statements are true for an n×nn\times n matrix AA :

  • rank(A)=n\text{rank} (A)= n

  • det(A)0\det(A)\neq 0

  • AA has an inverse

Details

Suppose AA is an n×nn\times n matrix. Then the following are truths:

  • rank(A)=n\text{rank} (A)= n

  • det(A)0\det(A)\neq 0

  • AA has an inverse